/**
 *                            License
 * THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS  
 * CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). 
 * THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW.  
 * ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR  
 * COPYRIGHT LAW IS PROHIBITED.
 * 
 * BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND  
 * AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE  
 * MAY BE CONSIDERED TO BE A CONTRACT,
 * THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 
 * HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
 * 
 */
package lineage.core;

import java.util.Map;

import lineage.packet.L1AbstractPacketClient;
import lineage.packet.client.C_CharActionExpression;
import lineage.packet.client.C_CharCreate;
import lineage.packet.client.C_CharDelete;
import lineage.packet.client.C_CharHeading;
import lineage.packet.client.C_CharLock;
import lineage.packet.client.C_CharMove;
import lineage.packet.client.C_CharSelectReturn;
import lineage.packet.client.C_EnterToGame;
import lineage.packet.client.C_GameTimeUpdate;
import lineage.packet.client.C_LoginAuth;
import lineage.packet.client.C_QuitGame;
import lineage.packet.client.C_ReturnToLogin;
import lineage.packet.client.C_ServerVersion;
import lineage.packet.client.C_WindowFocusStatus;
import lineage.packet.shared.CS_CharList;
import lineage.util.collections.Maps;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 封包码(3.51).
 * 
 * @version 2014年3月11日下午1:38:43
 * @author jrwz
 */
public final class Opcodes {
    private static final Logger LOG = LoggerFactory.getLogger(Opcodes.class);
    public static final Map<Integer, L1AbstractPacketClient> LIST = Maps.newHashMap();

    // 12011702
    // 客户端封包
    /** 请求 坐标传送(洞穴入口). */
    public static final int C_OPCODE_ENTER_PORTAL = 0;
    /** 请求 点选项目的结果(Y/N). */
    public static final int C_OPCODE_ATTR = 4;
    /** 请求 进入游戏. */
    public static final int C_OPCODE_ENTER_TO_GAME = 5;
    /** 请求 创建血盟. */
    public static final int C_OPCODE_CREATE_CLAN = 6;
    /** 请求 踢出血盟. */
    public static final int C_OPCODE_BAN_CLAN = 7;
    /** 请求 脱离血盟. */
    public static final int C_OPCODE_LEAVE_CLANE = 8;
    /** 请求 接收服务端版本. */
    public static final int C_OPCODE_SERVER_VERSION = 12;
    /** 请求 使用道具. */
    public static final int C_OPCODE_USE_ITEM = 13;
    /** 请求 登入服务器(输入账号密码按下确认键后). */
    public static final int C_OPCODE_LOGIN_SERVER = 14;
    /** 请求 读取布告栏信息列表. */
    public static final int C_OPCODE_BOARD = 16;
    /** 请求 坐标异常重整. */
    public static final int C_OPCODE_MOVE_LOCK = 17;
    /** 请求 选取观看频道(登入游戏后的频道自动开关). */
    public static final int C_OPCODE_LOGIN_TO_GAME_OK = 18;
    /** 请求 查询好友列表. */
    public static final int C_OPCODE_BUDDY_LIST = 19;
    /** 请求 远程攻击. */
    public static final int C_OPCODE_ARROW_ATTACK = 20;
    /** 请求 增加好友. */
    public static final int C_OPCODE_ADD_BUDDY = 22;
    /** 请求 查询队伍名单. */
    public static final int C_OPCODE_PARTY = 23;
    /** 请求 角色移动. */
    public static final int C_OPCODE_MOVE_CHAR = 24;
    /** 请求 对话窗口结果. */
    public static final int C_OPCODE_NPC_ACTION = 25;
    /** 请求 使用宠物道具. */
    public static final int C_OPCODE_USE_PET_ITEM = 30;
    /** 请求 显示对话窗口. */
    public static final int C_OPCODE_NPC_TALK = 31;
    /** 请求 读取布告栏内容. */
    public static final int C_OPCODE_BOARD_READ = 32;
    /** 请求 交易. */
    public static final int C_OPCODE_TRADE = 33;
    /** 请求 创建新角色. */
    public static final int C_OPCODE_NEW_CHAR = 34;
    /** 请求 捡起物品(地面上). */
    public static final int C_OPCODE_PICKUP_ITEM = 35;
    /** 请求 学习魔法的清单列表(金币). */
    public static final int C_OPCODE_SKILL_BUY_LIST = 36;
    /** 请求 角色封号(授予/自封). */
    public static final int C_OPCODE_TITLE = 37;
    /** 请求 取出资金(城堡宝库). */
    public static final int C_OPCODE_DRAWAL = 38;
    /** 请求 删除好友. */
    public static final int C_OPCODE_DELETE_BUDDY = 40;
    /** 请求 删除记忆坐标. */
    public static final int C_OPCODE_DELETE_BOOKMARK = 41;
    /** 请求 交易中增加物品. */
    public static final int C_OPCODE_TRADE_ADD_ITEM = 42;
    /** 请求 丢弃物品(仍到地面上). */
    public static final int C_OPCODE_DROP_ITEM = 43;
    /** 请求 记录快捷键. */
    public static final int C_OPCODE_CHARACTER_CONFIG = 47;
    /** 请求 列表物品取得. */
    public static final int C_OPCODE_RESULT = 48;
    /** 请求 对话窗口的数量选取结果. */
    public static final int C_OPCODE_AMOUNT = 50;
    /** 请求 学习魔法清单列表(材料). */
    public static final int C_OPCODE_SKILL_BUY_LIST_ITEM = 52;
    /** 请求 开关门/宝箱. */
    public static final int C_OPCODE_DOOR = 53;
    /** 请求 给予道具. */
    public static final int C_OPCODE_GIVE_ITEM = 55;
    /** 请求 使用聊天频道：全体. */
    public static final int C_OPCODE_CHAT_GLOBAL = 56;
    /** 请求 更新周围对象(坐标点/洞穴点切换进出后). */
    public static final int C_OPCODE_UPDATE_TELEPORT2 = 58;
    /** 请求 删除布告栏信息. */
    public static final int C_OPCODE_BOARD_DELETE = 59;
    /** 请求 使用邮件系统. */
    public static final int C_OPCODE_MAIL = 60;
    /** 请求 踢出队伍. */
    public static final int C_OPCODE_BAN_PARTY = 61;
    /** 请求 显示下一页布告栏信息. */
    public static final int C_OPCODE_BOARD_BACK = 62;
    /** 请求 使用拒绝名单(开启指定人物讯息). */
    public static final int C_OPCODE_EXCLUDE = 63;
    /** 请求 完成交易. */
    public static final int C_OPCODE_TRADE_OK = 64;
    /** 请求 变更与使用仓库密码. */
    public static final int C_OPCODE_WAREHOUSE_PWD = 65;
    /** 请求 更新时间(心跳包). */
    public static final int C_OPCODE_KEEP_ALIVE = 66;
    /** 请求 自动登入服务器. */
    public static final int C_OPCODE_AUTO_LOGIN = 68;
    /** 请求 改变面向. */
    public static final int C_OPCODE_CHANGE_HEADING = 69;
    /** 请求 使用魔法. */
    public static final int C_OPCODE_USE_SKILL = 71;
    /** 请求 写入信息至布告栏. */
    public static final int C_OPCODE_BOARD_WRITE = 72;
    /** 请求 显示宠物选单. */
    public static final int C_OPCODE_PETMENU = 74;
    /** 请求 宣战/投降/停战. */
    public static final int C_OPCODE_WAR = 75;
    /** 请求 更新周围对象(传送后). */
    public static final int C_OPCODE_UPDATE_TELEPORT = 76;
    /** 请求 变更税率. */
    public static final int C_OPCODE_TAX_RATE = 77;
    /** 请求 角色重置. */
    public static final int C_OPCODE_CHAR_RESET = 78;
    /** 请求 返回登入界面(输入帐号密码界面). */
    public static final int C_OPCODE_RETURN_TO_LOGIN = 79;
    /** 请求 显示角色列表(公告窗口点击确认后). */
    public static final int C_OPCODE_DISPLAY_CHAR_LIST = 80;
    /** 请求 查询PK次数. */
    public static final int C_OPCODE_CHECK_PK_COUNT = 81;
    /** 请求 查询在线玩家数量. */
    public static final int C_OPCODE_WHO = 83;
    /** 请求 开启个人商店. */
    public static final int C_OPCODE_SHOP = 84;
    /** 请求 使用血盟阶级功能(赋予成员). */
    public static final int C_OPCODE_CLAN_RANK = 86;
    /** 请求 离开游戏. */
    public static final int C_OPCODE_QUIT_GAME = 87;
    /** 请求 删除角色. */
    public static final int C_OPCODE_DELETE_CHAR = 88;
    /** 请求 上传盟标. */
    public static final int C_OPCODE_UPLOAD_CLAN_EMBLEM = 90;
    /** 请求 求婚. */
    public static final int C_OPCODE_PROPOSE = 91;
    /** 请求 离开队伍. */
    public static final int C_OPCODE_LEAVEPARTY = 92;
    /** 请求 查询血盟成员. */
    public static final int C_OPCODE_CLAN_MEMBER = 93;
    /** 请求 完成学习魔法(金币). */
    public static final int C_OPCODE_SKILL_BUY_OK = 95;
    /** 请求 死亡后重新开始. */
    public static final int C_OPCODE_DEAD_RESTART = 97;
    /** 请求 更新盟标. */
    public static final int C_OPCODE_UPDATE_CLAN_EMBLEM = 99;
    /** 请求 表情动作(alt+数字键). */
    public static final int C_OPCODE_EMOTE_ACTION = 100;
    /** 请求 改变窗口焦点状态(得到与失去焦点). */
    public static final int C_OPCODE_WINDOW_FOCUS_STATUS = 102;
    /** 请求 取消交易. */
    public static final int C_OPCODE_TRADE_CANCEL = 103;
    /** 请求 加入血盟. */
    public static final int C_OPCODE_JOIN_CLAN = 104;
    /** 请求 删除道具(背包内). */
    public static final int C_OPCODE_DELETE_INVENTORY_ITEM = 105;
    /** 请求 个人商店清单列表. */
    public static final int C_OPCODE_PRIVATE_SHOP_LIST = 106;
    /** 请求 使用聊天频道：一般. */
    public static final int C_OPCODE_CHAT = 109;
    /** 请求 切换角色. */
    public static final int C_OPCODE_CHANGE_CHAR = 111;
    /** 请求 增加记忆坐标. */
    public static final int C_OPCODE_ADD_BOOKMARK = 112;
    /** 请求 物品维修. */
    public static final int C_OPCODE_FIX_SELECT_LIST = 114;
    /** 请求 决斗. */
    public static final int C_OPCODE_FIGHT = 115;
    /** 请求 使用聊天频道：密语. */
    public static final int C_OPCODE_CHAT_WHISPER = 117;
    /** 请求 显示在线角色窗口(GM选单/双击角色名可以瞬移至身边). */
    public static final int C_OPCODE_DISPLAY_ONLINE_CHAR_WINDOW = 118;
    /** 请求 物品维修窗口的武器列表. */
    public static final int C_OPCODE_FIX_WEAPON_LIST = 119;
    /** 请求 完成学习魔法(材料). */
    public static final int C_OPCODE_SKILL_BUY_OK_ITEM = 120;
    /** 请求 存入资金(城堡宝库). */
    public static final int C_OPCODE_DEPOSIT = 124;
    /** 请求 选取目标. */
    public static final int C_OPCODE_SELECT_TARGET = 126;
    /** 请求 取消钓鱼. */
    public static final int C_OPCODE_FISH_CLICK = 127;
    /** 请求 攻击. */
    public static final int C_OPCODE_ATTACK = 129;
    /** 请求 创建队伍(邀请加入队伍). */
    public static final int C_OPCODE_CREATE_PARTY = 130;
    /** 请求 队伍对话控制(命令/chatparty). */
    public static final int C_OPCODE_CAHT_PARTY = 131;

    // 服务端封包
    /** 物件移动. */
    public static final int S_OPCODE_MOVE_OBJECT = 0;
    /** 魔法效果:操作混乱(醉酒). */
    public static final int S_OPCODE_LIQUOR = 2;
    /** 角色封号. */
    public static final int S_OPCODE_CHAR_TITLE = 3;
    /** 宣告进入游戏. */
    public static final int S_OPCODE_ENTER_GAME = 4;
    /** 魔法效果:水底呼吸. */
    public static final int S_OPCODE_BLESS_OF_EVA = 5;
    /** 往技能栏增加魔法. */
    public static final int S_OPCODE_ADD_SKILL = 6;
    /** 更新HP显示. */
    public static final int S_OPCODE_HP_UPDATE = 7;
    /** 登入状态. */
    public static final int S_OPCODE_LOGIN_RESULT = 8;
    /** 戒指. */
    public static final int S_OPCODE_ABILITY = 9;
    /** 创建新角色. */
    public static final int S_OPCODE_NEW_CHAR = 10;
    /** 角色名字变粉色(强行PK后). */
    public static final int S_OPCODE_PINK_NAME = 11;
    /** 更新物件亮度. */
    public static final int S_OPCODE_LIGHT = 12;
    /** 设置税率. */
    public static final int S_OPCODE_TAX_RATE = 14;
    /** 更新游戏天气. */
    public static final int S_OPCODE_WEATHER = 15;
    /** 聊天频道：一般. */
    public static final int S_OPCODE_CHAT_NORMAL = 16;
    /** 物件动作种类(长时间). */
    public static final int S_OPCODE_CHAR_VISUAL_UPDATE = 17;
    /** 初始化. */
    public static final int S_OPCODE_INIT_OPCODE = 18;
    /** 公告窗口(输入账号密码后弹出). */
    public static final int S_OPCODE_COMMON_NEWS = 19;
    /** NPC改变外型. */
    public static final int S_OPCODE_NPC_POLY = 20;
    /** 城堡宝库(要求领出资金). */
    public static final int S_OPCODE_DRAWAL = 21;
    /** 魔法购买清单(金币). */
    public static final int S_OPCODE_SKILL_BUY = 22;
    /** 配置城墙上的弓箭手列表(佣兵购买窗口). */
    public static final int S_OPCODE_PUT_BOW_SOLDIER_LIST = 23;
    /** NPC对话窗口. */
    public static final int S_OPCODE_SHOW_HTML = 24;
    /** 更新MP显示. */
    public static final int S_OPCODE_MP_UPDATE = 25;
    /** 更新物件面向. */
    public static final int S_OPCODE_CHANGE_HEADING = 26;
    /** 交易中增加物品. */
    public static final int S_OPCODE_TRADE_ADD_ITEM = 27;
    /** 从技能栏删除魔法. */
    public static final int S_OPCODE_DELETE_SKILL = 28;
    /** 角色资讯. */
    public static final int S_OPCODE_OWN_CHAR_STATUS = 30;
    /** 更新物件外型. */
    public static final int S_OPCODE_POLY = 31;
    /** 物件复活. */
    public static final int S_OPCODE_RESURRECTION = 32;
    /** 魔法效果:物件隐形. */
    public static final int S_OPCODE_INVIS = 33;
    /** 物品增加(背包). */
    public static final int S_OPCODE_ADD_ITEM = 34;
    /** 选取物品数量. */
    public static final int S_OPCODE_INPUT_AMOUNT = 36;
    /** 角色列表. */
    public static final int S_OPCODE_CHAR_LIST = 37;
    /** 角色盟标. */
    public static final int S_OPCODE_CLAN_EMBLEM = 38;
    /** 魔法购买清单(材料). */
    public static final int S_OPCODE_SKILL_BUY_ITEM = 39;
    /** 更新物品显示名称(背包). */
    public static final int S_OPCODE_ITEM_NAME = 40;
    /** 布告栏(讯息阅读). */
    public static final int S_OPCODE_BOARD_READ = 41;
    /** NPC对话(文字对话). */
    public static final int S_OPCODE_NPC_SHOUT = 42;
    /** 服务端版本. */
    public static final int S_OPCODE_SERVER_VERSION = 43;
    /** NPC物品购买清单(人物卖出). */
    public static final int S_OPCODE_SHOW_SHOP_SELL_LIST = 45;
    /** NPC物品贩卖清单(人物买入). */
    public static final int S_OPCODE_SHOW_SHOP_BUY_LIST = 47;
    /** 物件攻击(伤害力变更封包类型为 writeH(0x0000)). */
    public static final int S_OPCODE_ATTACK = 48;
    /** 设置攻城战时间. */
    public static final int S_OPCODE_WAR_TIME = 49;
    /** 魔法效果:中毒. */
    public static final int S_OPCODE_POISON = 50;
    /** 角色能力状态(力量,敏捷等). */
    public static final int S_OPCODE_OWN_CHAR_STATUS2 = 52;
    /** 魔法效果:诅咒. */
    public static final int S_OPCODE_PARALYSIS = 53;
    /** 删除角色(立即/非立即). */
    public static final int S_OPCODE_DETELE_CHAR_OK = 54;
    /** 更新血盟数据. */
    public static final int S_OPCODE_UPDATE_CLAN_ID = 56;
    /** 布告栏列表. */
    public static final int S_OPCODE_BOARD = 57;
    /** 物件新增主人. */
    public static final int S_OPCODE_NEW_MASTER = 58;
    /** 更新角色防御属性. */
    public static final int S_OPCODE_OWN_CHAR_ATTR_DEF = 59;
    /** 魔法效果:敏捷提升. */
    public static final int S_OPCODE_DEX_UP = 61;
    /** 服务器讯息(行数/行数,附加字串). */
    public static final int S_OPCODE_SERVER_MSG = 63;
    /** 聊天频道：密语. */
    public static final int S_OPCODE_CHAT_WHISPER = 65;
    /** 魔法效果:暗盲咒术. */
    public static final int S_OPCODE_CURSE_BLIND = 66;
    /** 更新魔攻与魔防. */
    public static final int S_OPCODE_SP_MR = 67;
    /** 封包盒子. */
    public static final int S_OPCODE_PACKET_BOX = 68;
    /** 魔法效果:防御类. */
    public static final int S_OPCODE_SKILL_ICON_SHIELD = 71;
    /** 更新角色所在的地图. */
    public static final int S_OPCODE_MAP_ID = 72;
    /** 魔法效果:精准目标. */
    public static final int S_OPCODE_TRUE_TARGET = 73;
    /** 角色创造结果. */
    public static final int S_OPCODE_NEW_CHAR_WRONG = 74;
    /** 角色重置升级能力(回忆蜡烛). */
    public static final int S_OPCODE_CHAR_RESET = 75;
    /** 角色皇冠. */
    public static final int S_OPCODE_CASTLE_MASTER = 76;
    /** 佣兵配置清单. */
    public static final int S_OPCODE_PUT_SOLDIER = 77;
    /** 交易. */
    public static final int S_OPCODE_TRADE = 78;
    /** 产生动画(物件). */
    public static final int S_OPCODE_SKILL_SOUND_GFX = 80;
    /** 物品名单(背包). */
    public static final int S_OPCODE_INV_LIST = 81;
    /** 物件属性(门). */
    public static final int S_OPCODE_ATTRIBUTE = 82;
    /** 选择一个目标. */
    public static final int S_OPCODE_SELECT_TARGET = 83;
    /** 更新游戏时间. */
    public static final int S_OPCODE_GAME_TIME = 84;
    /** 损坏武器清单. */
    public static final int S_OPCODE_SELECT_LIST = 85;
    /** 城堡宝库(要求存入资金). */
    public static final int S_OPCODE_DEPOSIT = 86;
    /** 血盟战争讯息(城堡编号,血盟名称,目标血盟名称). */
    public static final int S_OPCODE_WAR = 87;
    /** 物品色彩状态(背包). */
    public static final int S_OPCODE_ITEM_COLOR = 89;
    /** 画面中间的蓝色信息. */
    public static final int S_OPCODE_BLUE_MESSAGE = 91;
    /** 角色记忆坐标列表. */
    public static final int S_OPCODE_BOOK_MARK_LIST = 92;
    /** 交易状态. */
    public static final int S_OPCODE_TRADE_STATUS = 93;
    /** 物件删除. */
    public static final int S_OPCODE_DELETE_OBJECT = 94;
    /** 物品鉴定信息. */
    public static final int S_OPCODE_IDENTIFYDESC = 95;
    /** 魔法效果:勇敢药水类. */
    public static final int S_OPCODE_SKILL_BRAVE = 96;
    /** 物件封包. */
    public static final int S_OPCODE_CHAR_PACK = 97;
    /** 魔法效果:力量提升. */
    public static final int S_OPCODE_STR_UP = 99;
    /** 更新经验值. */
    public static final int S_OPCODE_EXP = 100;
    /** 物品名单(仓库). */
    public static final int S_OPCODE_SHOW_RETRIEVE_LIST = 101;
    /** 物件血条. */
    public static final int S_OPCODE_HP_METER = 103;
    /** 更新物品可使用数量(背包). */
    public static final int S_OPCODE_ITEM_COUNT = 104;
    /** 传送锁定(洞穴点/坐标点). */
    public static final int S_OPCODE_TELEPORT_LOCK = 105;
    /** 角色列表. */
    public static final int S_OPCODE_CHAR_LIST_COUNT = 106;
    /** 范围魔法. */
    public static final int S_OPCODE_RANGE_SKILLS = 107;
    /** 选项(Yes/No). */
    public static final int S_OPCODE_YES_NO = 108;
    /** 盟屋拍卖布告栏列表. */
    public static final int S_OPCODE_HOUSE_LIST = 109;
    /** 播放音效. */
    public static final int S_OPCODE_SOUND = 111;
    /** 个人商店列表. */
    public static final int S_OPCODE_PRIVATE_SHOP_LIST = 112;
    /** 立即中断连线. */
    public static final int S_OPCODE_DISCONNECT = 113;
    /** 邮件系统. */
    public static final int S_OPCODE_MAIL = 114;
    /** 画面中红色讯息(登入来源). */
    public static final int S_OPCODE_RED = 115;
    /** 传送锁定(通过NPC瞬间移动). */
    public static final int S_OPCODE_TELEPORT = 116;
    /** 产生动画(地点). */
    public static final int S_OPCODE_EFFECT_LOCATION = 117;
    /** 更新正义值. */
    public static final int S_OPCODE_LAWFUL = 118;
    /** 血盟小屋地图(地点). */
    public static final int S_OPCODE_HOUSE_MAP = 119;
    /** 聊天频道：全体. */
    public static final int S_OPCODE_CHAT_GLOBAL = 120;
    /** 学习魔法材料不足. */
    public static final int S_OPCODE_ITEM_ERROR = 121;
    /** 更新物件名称. */
    public static final int S_OPCODE_CHANGE_NAME = 122;
    /** 雇请佣兵(佣兵购买窗口). */
    public static final int S_OPCODE_HIRED_SOLDIER = 123;
    /** 物件动作种类(短时间). */
    public static final int S_OPCODE_DOACTION_GFX = 124;
    /** 魔法效果:加速类. */
    public static final int S_OPCODE_SKILL_HASTE = 125;
    /** 物品删除(背包). */
    public static final int S_OPCODE_DELETE_INVENTORY_ITEM = 126;
    /** 角色锁定(坐标异常重整). */
    public static final int S_OPCODE_CHAR_LOCK = 127;

    /** 种子. */
    public static final int seed = 0x58bfa78e;
    /** 第一组封包. */
    public static final byte[] firstPacket = {
            (byte) 0x12, // 全部封包长度
            (byte) 0x00,
            // 改版时不需要变动以上2个BYTE
            (byte) S_OPCODE_INIT_OPCODE, // 初始化封包
            (byte) 0x8e, (byte) 0xa7, (byte) 0xbf, (byte) 0x58, (byte) 0x42, (byte) 0xc0, (byte) 0x14, (byte) 0x3e, (byte) 0x62, (byte) 0x80, (byte) 0x0d, (byte) 0x00,
            (byte) 0x3d, (byte) 0xc2, (byte) 0x00 };

    // 初始化
    static {
        put(Opcodes.C_OPCODE_SERVER_VERSION, new C_ServerVersion()); // 验证版本
        put(Opcodes.C_OPCODE_LOGIN_SERVER, new C_LoginAuth()); // 登入验证
        put(Opcodes.C_OPCODE_RETURN_TO_LOGIN, new C_ReturnToLogin()); // 请求返回登入界面(输入帐号密码界面)
        put(Opcodes.C_OPCODE_QUIT_GAME, new C_QuitGame()); // 离开游戏
        put(Opcodes.C_OPCODE_DISPLAY_CHAR_LIST, new CS_CharList()); // 显示角色列表(公告窗口点击确认后)
        put(Opcodes.C_OPCODE_NEW_CHAR, new C_CharCreate()); // 请求 创建新角色
        put(Opcodes.C_OPCODE_ENTER_TO_GAME, new C_EnterToGame()); // 进入游戏
        put(Opcodes.C_OPCODE_KEEP_ALIVE, new C_GameTimeUpdate()); // 更新游戏时间
        put(Opcodes.C_OPCODE_WINDOW_FOCUS_STATUS, new C_WindowFocusStatus()); // 窗口焦点状态
        put(Opcodes.C_OPCODE_DELETE_CHAR, new C_CharDelete()); // 删除角色
        put(Opcodes.C_OPCODE_CHANGE_CHAR, new C_CharSelectReturn()); // 返回到角色选择界面
        put(Opcodes.C_OPCODE_MOVE_CHAR, new C_CharMove()); // 请求移动角色
        put(Opcodes.C_OPCODE_CHANGE_HEADING, new C_CharHeading()); // 请求改变面向
        put(Opcodes.C_OPCODE_EMOTE_ACTION, new C_CharActionExpression()); // 表情动作
        put(Opcodes.C_OPCODE_MOVE_LOCK, new C_CharLock()); // 回溯
    }

    /**
     * 将封包加入集合.
     * 
     * @param key
     *            - 键
     * @param value
     *            - 值
     */
    private static void put(final Integer key, final L1AbstractPacketClient value) {
        if (LIST.get(key) == null) {
            LIST.put(key, value);
        } else {
            LOG.error("重复的客户端封包：" + key + " " + value.getType());
        }
    }
}
